package com.zhonghui.model;


import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @description 用户信息-实体
 * @author zhonghui
 * @date 2020-11-29 16:03:17
 */
@Data
@Builder
@ApiModel(value = "用户信息-实体")
public class User   {

    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;
    @JsonIgnore
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;
    @JsonIgnore
    @ApiModelProperty(value = "创建人id")
    private Long createUser;
    @JsonIgnore
    @ApiModelProperty(value = "修改人id")
    private Long updateUser;
    @JsonIgnore
    @ApiModelProperty(value = "删除标记(1 删除 0未删除)")
    private Integer deleteFlag;
    @ApiModelProperty(value = "状态 1启用 0 禁用")
    private Integer status;
    @ApiModelProperty(value = "用户名")
    @NotBlank(message = "用户名称不能为空")
    private String userName;
    @ApiModelProperty(value = "邮箱")
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;
    @ApiModelProperty(value = "手机号")
    @NotBlank(message = "手机号不能为空")
    @Size(max = 11,message = "长度不能超出11位")
    private String phone;
    @ApiModelProperty(value = "密码")
    @NotBlank(message = "密码不能为空")
    private String password;
    private String nickname;
    private BigDecimal balance;
}
